/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.paris5.master2.guitarmaster.bean;

import java.util.Date;

/**
 *
 * @author mourad
 */
public class EcomCartRow implements EcomBean {
    private Integer idCartRow;
    private Float price;
    private Integer quantity;
    private EcomProductType product;
    private Float totalPrice;

    public Integer getIdCartRow() {
        return idCartRow;
    }

    public Float getPrice() {
        return price;
    }

    public void setPrice(Float price) {
        this.price = price;
    }

    public EcomProductType getProduct() {
        return product;
    }

    public Integer getQuantity() {
        return quantity;
    }

    public void setQuantity(Integer quantity) {
        this.quantity = quantity;
    }

    public void setIdCartRow(Integer idCartRow) {
        this.idCartRow = idCartRow;
    }

    public void setProduct(EcomProductType product) {
        this.product = product;
    }

    public Float getTotalPrice() {
        return totalPrice;
    }

    public void setTotalPrice(Float totalPrice) {
        this.totalPrice = totalPrice;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final EcomCartRow other = (EcomCartRow) obj;
        if (this.idCartRow!= other.idCartRow && (this.idCartRow == null || !this.idCartRow.equals(other.idCartRow))) {
            return false;
        }
        if (this.quantity != other.quantity && (this.quantity == null || !this.quantity.equals(other.quantity))) {
            return false;
        }

        if (this.product != other.product && (this.product == null || !this.product.equals(other.product))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Cart{"  + ", quantity=" + quantity +  ", product=" + product + '}';
    }
}
